The present disclosure relates to data replication or synchronization, and more particularly, to a system and method for incremental replication of changes in a state based distributed database synchronization system.
Replication or synchronization refers to a process by which data existing on a server is transferred to another server and kept consistent with the originals. Various methods of replication have been proposed. One such proposal includes a store and forward method of replication in which each server keeps track of locally made changes to a particular copy of a data set (sometimes referred to as a “replica”), which contains one or more data objects. Each server periodically broadcasts the new locally made changes (since the last replication broadcast) to all other related servers. Such locally made changes may include the creation of new data, modification of existing data, or deletion of existing data. The group of other servers also having a copy of the data set is kept on a “replica list.” The changes are preferably broadcast in the form of updated copies of the changed data. This allows each server to update its local copy of the data set as changes are received by replacing the older data with the newer data. In order to keep the replicas of a given data set consistent, a transaction log may be used. The transaction log keeps track of every transaction or modification that occurs on the data set, and when replication occurs, the transaction logs are sent to various destination servers to execute such transactions.
Certain limitations exist through the use of the transaction log for data replication. For example, every little change that occurs to an object must be kept in the transaction log, and as the amount of data increases and/or the rate of change becomes large, using the transaction log is inefficient to keep the data to be replicated consistently. In other words, this method does not scale well as the size and rate of change of the data increases. In addition, predefined time windows are needed in order to clear old messages, and thus large transaction queues are created for the replication process, which may cause significant latency of replication when new changes are made to objects in the database system. As the distributed database system gets bigger and bigger, replications of large numbers changes to objects demand a serious consideration since all changes need to be successfully synchronized efficiently to assure the reliability and integrity of the system. As an alternative, a state based replication system can be used in which only the current states of the objects are sent during replication, not every transaction related to the objects. However, a purely state based system may require that all replica servers communicate with each other to synchronize changes made on their replicas. A “transitive” synchronization method wherein each replica server is informed about the state of the other replica servers, allows changes from one replica to be passed through another replica server to a destination replica without the original source server itself having to directly synchronize the change to every destination replica. However, any state based replication method, transitive or not, fails to define an appropriate mechanism for dealing with large numbers of changes in a large data set. For example, assuming a 10 million object partition is being added to a Server A, and Server B is replicating these 10 million objects to Server A, if a transport error or any other error disrupts this replication process, Server B will have to restart the replication process all over again from the first object because Server B is synchronizing a specific state, not individual transactions. This obviously does not meet the needs of a scalable distributed database system.
Therefore, what is needed is a process for incremental replication of changes in a state based distributed database synchronization system that overcomes the limitations and complexities described above.